home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / public / fax / src / faxd / ModemConfig.h < prev    next >
C/C++ Source or Header  |  1994-08-01  |  6KB  |  120 lines

  1. /*    $Header: /usr/people/sam/fax/faxd/RCS/ModemConfig.h,v 1.25 1994/03/29 17:29:37 sam Rel $ */
  2. /*
  3.  * Copyright (c) 1990, 1991, 1992, 1993, 1994 Sam Leffler
  4.  * Copyright (c) 1991, 1992, 1993, 1994 Silicon Graphics, Inc.
  5.  *
  6.  * Permission to use, copy, modify, distribute, and sell this software and 
  7.  * its documentation for any purpose is hereby granted without fee, provided
  8.  * that (i) the above copyright notices and this permission notice appear in
  9.  * all copies of the software and related documentation, and (ii) the names of
  10.  * Sam Leffler and Silicon Graphics may not be used in any advertising or
  11.  * publicity relating to the software without the specific, prior written
  12.  * permission of Sam Leffler and Silicon Graphics.
  13.  * 
  14.  * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
  15.  * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
  16.  * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
  17.  * 
  18.  * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
  19.  * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
  20.  * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  21.  * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
  22.  * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
  23.  * OF THIS SOFTWARE.
  24.  */
  25. #ifndef _ModemConfig_
  26. #define    _ModemConfig_
  27. /*
  28.  * Modem Configuration.
  29.  */
  30. #include "FaxModem.h"
  31.  
  32. struct ModemConfig {
  33.     fxStr    type;            // hinted modem type
  34.     fxStr    resetCmds;        // extra modem reset commands
  35.     fxStr    dialCmd;        // cmd for dialing (%s for number)
  36.     fxStr    answerAnyCmd;        // cmd for answering unknown call type
  37.     fxStr    answerDataCmd;        // cmd for answering data call
  38.     fxStr    answerFaxCmd;        // cmd for answering fax call
  39.     fxStr    answerVoiceCmd;        // cmd for answering voice call
  40.     fxStr    flowControlCmd;        // cmd for setting up flow control
  41.     fxStr    setupDTRCmd;        // cmd for setting up DTR handling
  42.     fxStr    setupDCDCmd;        // cmd for setting up DCD handling
  43.     fxStr    setupAACmd;        // cmd for setting up adaptive answer
  44.     fxStr    noAutoAnswerCmd;    // cmd for disabling auto-answer
  45.     fxStr    setVolumeCmd[5];    // cmd for setting modem speaker volume
  46.     fxStr    echoOffCmd;        // cmd for disabling echo
  47.     fxStr    verboseResultsCmd;    // cmd for enabling verbose result codes
  48.     fxStr    resultCodesCmd;        // cmd for enabling result codes
  49.     fxStr    onHookCmd;        // cmd for placing phone ``on hook''
  50.     fxStr    softResetCmd;        // cmd for doing soft reset
  51.     fxStr    waitTimeCmd;        // cmd for setting carrier wait time
  52.     fxStr    pauseTimeCmd;        // cmd for setting "," pause time
  53.     fxStr    mfrQueryCmd;        // cmd for getting modem manufacturer
  54.     fxStr    modelQueryCmd;        // cmd for getting modem model id
  55.     fxStr    revQueryCmd;        // cmd for getting modem firmware rev
  56.     fxStr    answerAnyBeginCmd;    // cmd to start unknown inbound session
  57.     fxStr    answerDataBeginCmd;    // cmd to start inbound data session
  58.     fxStr    answerFaxBeginCmd;    // cmd to start inbound fax session
  59.     fxStr    answerVoiceBeginCmd;    // cmd to start inbound voice session
  60.  
  61.                     // protocol timers
  62.     u_int    t1Timer;        // T.30 T1 timer (ms)
  63.     u_int    t2Timer;        // T.30 T2 timer (ms)
  64.     u_int    t4Timer;        // T.30 T4 timer (ms)
  65.     u_int    dialResponseTimeout;    // dialing command timeout (ms)
  66.     u_int    answerResponseTimeout;    // answer command timeout (ms)
  67.     u_int    pageStartTimeout;    // page send/receive timeout (ms)
  68.     u_int    pageDoneTimeout;    // page send/receive timeout (ms)
  69.                     // for class 1:
  70.     fxStr    class1Cmd;        // cmd for setting Class 1
  71.     u_int    class1TCFResponseDelay;    // delay (ms) btwn TCF & ack/nak
  72.     u_int    class1SendPPMDelay;    // delay (ms) before sending PPM
  73.     u_int    class1SendTCFDelay;    // delay (ms) btwn sending DCS & TCF
  74.     u_int    class1TrainingRecovery;    // delay (ms) after failed training
  75.     u_int    class1RecvAbortOK;    // if non-zero, OK sent after recv abort
  76.     u_int    class1FrameOverhead;    // overhead bytes in received frames
  77.     u_int    class1RecvIdentTimer;    // timeout receiving initial identity
  78.                     // for class 2 and 2.0:
  79.     fxStr    class2Cmd;        // cmd for setting Class 2/2.0
  80.     fxStr    class2DCCQueryCmd;    // cmd to query modem capabilities
  81.     fxStr    class2BORCmd;        // cmd to set bit order
  82.     fxStr    class2RELCmd;        // cmd to enable byte-aligned EOL
  83.     fxStr    class2CQCmd;        // cmd to setup copy quality checking
  84.     fxStr    class2AbortCmd;        // cmd to abort a session
  85.     fxStr    class2TBCCmd;        // cmd to enable stream mode
  86.     fxStr    class2CRCmd;        // cmd to enable receive capability
  87.     fxStr    class2PHCTOCmd;        // cmd to set Phase C timeout parameter
  88.     fxStr    class2BUGCmd;        // cmd to enable HDLC frame tracing
  89.     fxStr    class2LIDCmd;        // cmd to set local identifier string
  90.     fxStr    class2DCCCmd;        // cmd to set modem capabilities
  91.     fxStr    class2DISCmd;        // cmd to set session parameters
  92.     fxStr    class2CIGCmd;        // cmd to set polling identifier
  93.     fxStr    class2SPLCmd;        // cmd to set polling request
  94.     fxStr    class2RecvDataTrigger;    // send to start recv
  95.     fxBool    class2XmitWaitForXON;    // wait for XON before send
  96.                     // for class 2.0:
  97.     fxStr    class2PIECmd;        // cmd to set proc interrupt handling
  98.     fxStr    class2NRCmd;        // cmd to set status reporting
  99.  
  100.     FlowControl    flowControl;        // DTE-DCE flow control method
  101.     BaudRate    maxRate;        // max DTE-DCE rate to try
  102.     u_int    recvFillOrder;        // bit order of recvd data
  103.     u_int    sendFillOrder;        // bit order of sent data
  104.     u_int    frameFillOrder;        // bit order of HDLC frames
  105.     u_int    hostFillOrder;        // host bit order
  106.     u_int    resetDelay;        // delay (ms) after reseting modem
  107.     u_int    baudRateDelay;        // delay (ms) after setting baud rate
  108.     u_int    maxPacketSize;        // max page data packet size (bytes)
  109.     u_int    interPacketDelay;    // delay (ms) between outgoing packets
  110.     fxBool    waitForConnect;        // modem sends multiple answer responses
  111.  
  112.     ModemConfig();
  113.     ~ModemConfig();
  114.  
  115.     fxBool parseItem(const char* tag, const char* value);
  116.     void setVolumeCmds(const fxStr& value);
  117.     fxStr parseATCmd(const char*);
  118. };
  119. #endif /* _ModemConfig_ */
  120.